package DieSiedler;

import java.awt.BasicStroke;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Stroke;


public class GraphicHelper {
	
	static public void drawFatLine(Graphics g, int x0, int y0, int x1, int y1, int width){
		
		Graphics2D g2 = (Graphics2D) g; 
		Stroke stroke = new BasicStroke(width+1); 
		g2.setStroke(stroke);
		
		g2.drawLine(x0, y0, x1, y1);
		
		/*
		
		int xp[] = new int[4];
	   	int yp[] = new int[4];
	   	
	   	int fac = 1;
	   	if(x0 < x1 && y0 < y1){
	   		fac = -1;
	   	}
	   	
	   	xp[0] = x0-width*fac;
	   	yp[0] = y0-width;
	   	xp[1] = x1-width*fac;
	   	yp[1] = y1-width;
	   	xp[2] = x1+width*fac;
	   	yp[2] = y1+width;
	   	xp[3] = x0+width*fac;
	   	yp[3] = y0+width;
	   	
	   	g.fillPolygon(xp, yp, 4);
	   	*/
	   	
	   }
}
